<script type="text/javascript" src="<?php echo JS_PATH;?>gritter/js/jquery.gritter.js"></script>
    <script type="text/javascript" src="<?php echo JS_PATH;?>gritter-conf.js"></script>

  <script class="include" type="text/javascript" src="<?php echo JS_PATH;?>jquery.dcjqaccordion.2.7.js"></script>
  <script src="<?php echo JS_PATH;?>bootstrap-switch.js"></script>
    <!--script for this page-->
    <script src="<?php echo JS_PATH;?>sparkline-chart.js"></script>    
    <script src="<?php echo JS_PATH;?>zabuto_calendar.js"></script>	  
       <script src="<?php echo JS_PATH;?>common-scripts.js"></script>
       <script src="<?php echo JS_PATH;?>raphael-min.js"></script>
        <script src="<?php echo JS_PATH;?>morris-0.4.3.min.js"></script>
       <script>
             <{if isset($tenant["id"])}>
           $(".jpmylocal").click(function(){
               $(".jplocalcitylist").hide();
               $(".jplocalarealist").hide();
               $(".jplocalprovincelist").show();
               $("#jpmylocalmodal").modal('show');
           });
         
           $(document).ready(function(){
                $("a.jp_provincelist").click(function(){
                    var province_id=$(this).data("id");
                    var province=$(this).html();
                    var jplabelprovince=$(".jplabelprovince");
                    if(jplabelprovince.length>0){
                        jplabelprovince.html(province);
                         $.post("<{echo Common::RewriteUrl("Tenantadmin","public_ajax_updateProvince");}>",{"province":province,"tid":<{$tenant["id"]}>});
                         $.post("<{echo Common::RewriteUrl("Tenantadmin","public_ajax_clearlocal");}>",{"ctype":1,"tid":<{$tenant["id"]}>});
                    }
                    $("input[name='province_id']").val(province_id);
                     $.post("<{echo Common::RewriteUrl("Tenantadmin","public_ajax_getcitylist");}>",{"proid":province_id},function(html){
                         if(html){
                            $(".jplocalcitylist").html(html);
                            $(".jplocalprovincelist").fadeOut("normal",function(){
                                $(".jplocalcitylist").fadeIn();
                            });
                        }else{
                              
                              $("#jpmylocalmodal").modal('hide');
                        }
                        $(".jpsearchlabelcity").html(province);
                         
                         
                     });
                   
                });
           });
          <{/if}>
       </script>
       
       
       
  <div class="modal fade" id="jpmylocalmodal" tabindex="-1" role="dialog" aria-labelledby="jpmylocalmodal">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="jpmylocalmodaltitle">请选择地址</h4>
      </div>
      <div class="modal-body">
<div class="jplocallist jplocalprovincelist">
<div class="list-group">
    
    <{if isset($provincelist)&&$provincelist}>
    <{foreach $provincelist as $v}>
    <a href="javascript:void(0);" data-id="<{$v["id"]}>"  class="jp_provincelist cursor list-group-item <{if isset($tenant["province_id"])&&$tenant["province_id"]&&intval($v["id"])===intval($tenant["province_id"])}>active<{/if}>">
        <{$v["province"]}>
  </a>
    <{/foreach}>
    <{/if}>
</div>
</div>
          <div class="jplocallist jplocalcitylist jphidden">
              
          </div>    
          <div class="jplocallist jplocalarealist jphidden">
              
          </div>      
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
      </div>
    </div>
  </div>
</div>
</body>
</html>